package com.hx.common.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Result implements Serializable {
    private Integer code;
    private String msg;
    private Object data;

    public static Result ok(Object data){
        return new Result(0,"操作成功",data);
    }
    public static Result ok(){
        return ok(null) ;
    }

    public static Result fail(Object data){
        return new Result(1,"操作失败",data);
    }
}
